<div class="framework-box">
    <div class="billing-module">
        <div class="module-title">计费模式</div>
        <div class="module-select">
            <p class="active">X86计算</p>
        </div>
    </div>
    <div class="billing-module">
        <div class="module-title">规格</div>
        <div class="module-content" style="flex-grow:1">
            <div class="module-select" style="margin-top: 20px;">
                <p class="active">通用计算增强型</p>
                <div class="question-box" style="height: 35px;">
                    <img src="{{ STATIC_URL }}ratingfunction/img/question.png" alt="">
                    <div class="question">
                        问题介绍
                    </div>
                </div>
            </div>
            <table class="table">
                <thead>
                <tr>
                    <th>名称</th>
                    <th>vCPUs|内存</th>
                    <th>CPU</th>
                    <th>磁盘</th>
                    <th>公有</th>
                    <th>参考价格</th>
                </tr>
                </thead>
                <tbody>
                {% for flavor_dict in flavor_list %}
                    <tr>
                        <td><input name="flavor_id" type="radio" required id="item"
                                   value="{{ flavor_dict.id }}">{{ flavor_dict.name }}</td>
                        {# 判断内存大小，大于1024的化简GB #}
                        {% if flavor_dict.memory_mb < 1024 %}
                            <td>{{ flavor_dict.memory_mb }}M</td>
                        {% elif flavor_dict.memory_mb >= 1024 %}
                            <td>{% widthratio flavor_dict.memory_mb 1024 1 %}GB</td>
                        {% endif %}
                        <td>{{ flavor_dict.vcpus }}核</td>
                        <td id="disk">{{ flavor_dict.disk }} GB</td>
                        {% if flavor_dict.is_public == True %}
                            <td>是</td>
                        {% else %}
                            <td>否</td>
                        {% endif %}
                        <td id="money">{{ flavor_dict.cost | floatformat:3}} 元/小时</td>
                    </tr>
                {% endfor %}

                </tbody>
            </table>
        </div>
    </div>
</div>
